package com.bristua.mall.order.controller;

import com.bristua.mall.common.bean.Result;
import com.bristua.mall.common.utils.HandleResultUtil;
import com.bristua.mall.order.biz.OrderGoodsEvaluateBiz;
import com.bristua.mall.order.enums.OrderCode;
import com.bristua.mall.order.model.condition.goodsEvaluate.GoodsEvaluate;
import com.bristua.mall.order.model.condition.goodsEvaluate.OrderEvaluate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by Administrator on 2019/3/24.
 */
@RestController
@Api(value="商品评价",tags={"商品评价"})
public class OrderGoodsEvaluateController {

    @Autowired
    private OrderGoodsEvaluateBiz orderGoodsEvaluateBiz;

    @ApiOperation(value="商品评价")
    @PostMapping(value="/api/order/goods/evaluate")
    public Result orderGoodsEvaluate(@RequestBody OrderEvaluate orderEvaluate){
        orderGoodsEvaluateBiz.orderGoodsEvaluate(orderEvaluate);
        return HandleResultUtil.commonResult(OrderCode.GOODS_EVALUTATE.getCode(),OrderCode.GOODS_EVALUTATE.getMsg());
    }
}
